Optimal. Leaf size=27 \[ B x+\frac {C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {A \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {4132, 8, 4130,
3855} \begin {gather*} \frac {A \sin (c+d x)}{d}+B x+\frac {C \tanh ^{-1}(\sin (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3855
Rule 4130
Rule 4132
Rubi steps
\begin {align*} \int \cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=B \int 1 \, dx+\int \cos (c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx\\ &=B x+\frac {A \sin (c+d x)}{d}+C \int \sec (c+d x) \, dx\\ &=B x+\frac {C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {A \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 38, normalized size = 1.41 \begin {gather*} B x+\frac {C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {A \cos (d x) \sin (c)}{d}+\frac {A \cos (c) \sin (d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.32, size = 37, normalized size = 1.37
method | result | size |
derivativedivides | \(\frac {A \sin \left (d x +c \right )+B \left (d x +c \right )+C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(37\) |
default | \(\frac {A \sin \left (d x +c \right )+B \left (d x +c \right )+C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(37\) |
risch | \(B x -\frac {i A \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}\) | \(74\) |
norman | \(\frac {B x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-B x -\frac {2 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 A \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(119\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 46, normalized size = 1.70 \begin {gather*} \frac {2 \, {\left (d x + c\right )} B + C {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.29, size = 45, normalized size = 1.67 \begin {gather*} \frac {2 \, B d x + C \log \left (\sin \left (d x + c\right ) + 1\right ) - C \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, A \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 70 vs.
\(2 (27) = 54\).
time = 0.42, size = 70, normalized size = 2.59 \begin {gather*} \frac {{\left (d x + c\right )} B + C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.52, size = 68, normalized size = 2.52 \begin {gather*} \frac {2\,B\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {A\,\sin \left (c+d\,x\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________